package cn.web.provider.dubboConfig.runner;


import cn.web.provider.dubboConfig.mbean.ShutdownLatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;

public class DubboServiceLatchCommandLineRunner implements CommandLineRunner {

    protected static Logger logger = LoggerFactory.getLogger(DubboServiceLatchCommandLineRunner.class);
    private String domain = "com.test";

    public DubboServiceLatchCommandLineRunner() {
    }

    public void run(String... strings) throws Exception {
        logger.info("DubboServiceLatchCommandLineRunner start.");
        ShutdownLatch latch = new ShutdownLatch(this.getDomain());
        latch.await();
    }

    public String getDomain() {
        return this.domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

}
